"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toFixed = exports.randomStr = void 0;

var toFixed = function toFixed() {
  var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  return 0.01 * Math.floor(100 * number);
}; // 随机数，获取当前canvas id


exports.toFixed = toFixed;

var randomStr = function randomStr() {
  var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
  var string = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  var l = string.length;
  var str = '';

  for (var i = 0; i < len; i++) {
    var index = Math.floor(Math.random() * 100 * l % l);
    str += string[index];
  }

  return str;
};

exports.randomStr = randomStr;